#ifndef NONTRIVIAL_CONSTRUCTOR_H
#define NONTRIVIAL_CONSTRUCTOR_H

#include "common.h"
#include "string-util.h"
namespace elloop_test {

	class Book {
	public:
		Book() {
			pln("Book constructor");
		}
		~Book() {
			pln("~Book()");
		}
	};

	class Animal {
	public:
		Animal() {
			pln("Animal constructor");
		}
		~Animal() {
			pln("~Animal()");
		}
	};

	class Building {
	public:
		Building() {
			pln("Building constructor");
		}
		~Building() {
			pln("~Building()");
		}
	};

	class NonTrivialConstructor {
	public:
		// case 1: no constructor -- synsesis default contructor will extend to call the constructor of the member objects -- tested!
		// case 2: several constructor, will every constructor be extended by the complier to add the constructor of the member objects -- tested!
		// every contructor will be extended by the compiler to add the contructor of the member objects into its constructor
		NonTrivialConstructor() {}
		NonTrivialConstructor(int i) { psln(i); }
		NonTrivialConstructor(int i, int j) { psln(i); psln(j); }
	private:
		Book _book;
		Building _building;
		Animal _animal;

		int _i;
		int _j;
	};

}

#endif